<?php


namespace app\api\model;


class User extends BaseModel
{
    public function address(){
        return $this->hasOne(UserAddress::class,'user_id','id');
    }
    public static function getByOpenID($openid){
        return self::where('openid','=',$openid)->find();
    }
    public static function getByUID($uid){
        return self::where('id','=',$uid)->find();
    }

}